
<div class="col-md-6">
	<div class="row">
		<h4><?php echo  translate("account_details");?></h4>
	</div>
</div>
<div class="clearfix"></div>
<hr />
<div class="center-align center">
	<label class="checkbox-inline">
	  	<input type="radio" id="individual_person" name="type" value="0" <?php echo ((isset($client['type']) && $client['type'] == 0) || !isset($client["type"]) ? "checked='checked'" : "");?> > <?php echo  translate("individual_person");?>
	</label>
	<label class="checkbox-inline">
	  	<input type="radio" id="legal_person" name="type" value="1" <?php echo (isset($client['type']) && $client['type'] == 1 ? "checked='checked'" : "");?> > <?php echo  translate("legal_person");?>
	</label>
</div>
<br class="clearfix" />
<div class="col-md-6">
	<div class="form-group">
		<label for="name" class="col-sm-3 control-label"><?php echo  strtolower(translate("name"));?></label>
  		<div class="col-sm-9">
	   		<input type="text" class="form-control" id="name" name="name" placeholder="<?php echo  translate("name");?>" value="<?php echo (isset($client['name']) ? $client['name'] : "") ?>" />
	   	</div>
  	</div>
	<?php
		$countyID = 0;
		$cityID = 0;
		
		if($client)
		{
			$countyID = $client["county_id"];
			$cityID = $client["city_id"];
		}
		
	?>
	<div class="form-group">
		<label for="county_id" class="col-sm-3 control-label"><?php echo translate("county");?></label>
		<div class="col-sm-9">
		  	<select id="county_id" name="county_id" class="form-control" value="<?php echo $countyID; ?>">
		  		<?php generateCountyList($countyID); ?>
			</select>
		</div>
	</div>
	
	<div class="form-group">
		<label for="zip_code" class="col-sm-3 control-label"><?php echo translate("zip_code");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="zip_code" name="zip_code" placeholder="<?php echo  translate("zip_code");?>" value="<?php echo (isset($client['zip_code']) ? $client['zip_code'] : "") ?>" />
	    </div>
  	</div>
  	
	<div class="form-group legal-person">
		<label for="fax" class="col-sm-3 control-label"><?php echo translate("fax");?></label>
		<div class="col-sm-9">
	    	<input type="tel" class="form-control" id="fax" name="fax" placeholder="<?php echo  translate("fax");?>" value="<?php echo (isset($client['fax']) ? $client['fax'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group legal-person">
  		<label for="unique_code" class="col-sm-3 control-label"><?php echo translate("CUI");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="unique_code" name="unique_code" placeholder="<?php echo  translate("CUI");?>" value="<?php echo (isset($client['unique_code']) ? $client['unique_code'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group legal-person">
  		<label for="bank_account" class="col-sm-3 control-label"><?php echo translate("bank_account");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="bank_account" name="bank_account" placeholder="<?php echo  translate("bank_account");?>" value="<?php echo (isset($client['bank_account']) ? $client['bank_account'] : "") ?>" />
	    </div>
  	</div>
  	
  	<?php if(!isset($client["id"]) && !isset($hideCaptcha)):?>
	  	<div class="form-group">
	  		<div class="row">
		  		<div class="col-sm-6">
		  			<img id="captcha" src="<?php echo scripts_url(); ?>libs/helpers/securimage/securimage_show.php" alt="CAPTCHA Image" class="img-responsive" />
		  			<a href="#" id="newCaptcha" onclick="document.getElementById('captcha').src = '<?php echo scripts_url(); ?>libs/helpers/securimage/securimage_show.php?' + Math.random(); return false">[ <?php echo translate("refresh_captcha");?> ]</a>
		  		</div>
		  		<div class="col-sm-6">
		  			<input type="text" class="form-control" id="captcha" name="captcha" placeholder="<?php echo translate("captcha"); ?>" />
				</div>
			</div>
	  	</div>
  	<?php endif; ?>
</div>
<div class="col-md-6">
	<div class="form-group">
		<label for="address" class="col-sm-3 control-label"><?php echo translate("address");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="address" name="address" placeholder="<?php echo  translate("address");?>" value="<?php echo (isset($client['address']) ? $client['address'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group">
  		<label for="city_id" class="col-sm-3 control-label"><?php echo translate("city");?></label>
		<div class="col-sm-9">
		  	<select id="city_id" name="city_id" class="form-control" value="<?php echo $cityID; ?>" <?php echo ($cityID == 0 ? "disabled='disabled'" : "") ?> >
			  	<?php generateCityList($countyID, $cityID); ?>
			</select>
		</div>
	</div>
  	
  	<div class="form-group">
  		<label for="phone" class="col-sm-3 control-label"><?php echo translate("phone");?></label>
		<div class="col-sm-9">
	    	<input type="tel" class="form-control" id="phone" name="phone" placeholder="<?php echo  translate("phone");?>" value="<?php echo (isset($client['phone']) ? $client['phone'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group legal-person">
  		<label for="registration_number" class="col-sm-3 control-label"><?php echo translate("registration_number");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="registration_number" name="registration_number" placeholder="<?php echo  translate("registration_number");?>" value="<?php echo (isset($client['registration_number']) ? $client['registration_number'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group legal-person">
  		<label for="bank_name" class="col-sm-3 control-label"><?php echo translate("bank_name");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="bank_name" name="bank_name" placeholder="<?php echo  translate("bank_name");?>" value="<?php echo (isset($client['bank_name']) ? $client['bank_name'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group legal-person">
  		<label for="company_phone" class="col-sm-3 control-label"><?php echo translate("contact_person_phone");?></label>
		<div class="col-sm-9">
	    	<input type="tel" class="form-control" id="company_phone" name="company_phone" placeholder="<?php echo  translate("contact_person_phone");?>" value="<?php echo (isset($client['company_phone']) ? $client['company_phone'] : "") ?>" />
	    </div>
  	</div>
  	
  	<div class="form-group legal-person">
  		<label for="company_contact_name" class="col-sm-3 control-label"><?php echo translate("preson_of_contact");?></label>
		<div class="col-sm-9">
	    	<input type="text" class="form-control" id="company_contact_name" name="company_contact_name" placeholder="<?php echo  translate("preson_of_contact");?>" value="<?php echo (isset($client['company_contact_name']) ? $client['company_contact_name'] : "") ?>" />
	    </div>
  	</div>
</div>
<div class="clearfix"></div>
<div class="col-md-8">
	<div class="checkbox inline">
	  	<label>
    		 <?php echo  translate("agree_with_terms_and_conditions");?>
    		 <input type="checkbox" value="1" name="terms_and_conditions" id="terms_and_conditions" <?php echo (isset($client['terms_and_conditions']) && $client['terms_and_conditions'] == 1 ? "checked='checked' disabled='disabled'" : "") ?>" />
	  	</label>
	</div>
	<div class="checkbox inline">
	  	<label>
    		 <?php echo  translate("recieve_newsletters");?>
    		 <?php
    		 	$newsletterCheck = array();
				if(isset($client["id"]))
				{
    		 		$newsletterCheck = $connection->fetch_row("newsletter_users", $client["email"], "email");
				}
    		 ?>
    		 <input type="checkbox" value="1" name="recieve_newsletter" id="recieve_newsletter" <?php echo (isset($newsletterCheck["id"]) ? "checked='checked'" : ""); ?>" />
	  	</label>
	</div>
</div>
